package com.my.main.mapper.userAndRight;

import com.my.main.base.mapper.BaseMapper;
import com.my.main.entity.userAndRight.SysUserContractTypeRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户、角色与合同分类关系表mapper
 */
@Mapper
public interface SysUserContractTypeRelationMapper extends BaseMapper<SysUserContractTypeRelation> {

    /**
     * 通过用户ID和角色ID集合查询合同分类ID集合
     * @param userId 用户ID
     * @param roleIdList 角色ID集合
     * @return 合同分类ID集合
     */
    List<String> queryContractTypeIdListByUserIdAndRoleIdList(@Param("userId") String userId, @Param("roleIdList") List<String> roleIdList);

    /**
     * 通过合同分类删除关系
     *
     * @param typeId 合同分类ID
     *
     * @return 执行行数
     */
    int isDeleteByContractTypeId(String typeId);

}
